package Util;

import org.springframework.stereotype.Component;

/**
 * Created by F on 2017/2/28.
 */

@Component
public class Result {
    private boolean success;
    private String info;
    private Object data;//也可用来标识错误代码

    public Result(boolean success,String info){
        setSuccess(success);
        setInfo(info);
    }
    public Result(boolean success,String info,Object data){
        setSuccess(success);
        setInfo(info);
        setData(data);
    }

    public void setData(Object data) {
        this.data = data;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Object getData() {
        return data;
    }

    public String getInfo() {
        return info;
    }

    public boolean getSuccess(){
        return success;
    }

}
